<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include  file="/jsps/common/taglibs.jsp" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    
    <title></title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	
	<script type="text/javascript">
	    
	    //返回上一页
	    function goback(){
	        history.go(-1);
	    }
	    
	    //查看订单商品信息
	    function look_goods_info(no){
	        location.href="<c:url value="/indentMgr?act=look_goods_info&indentNo="/>"+no;
	    }
	    
	    //检查表单信息
	    function check_infos(){
	        
	        var isOk=true;
	        
	        with(document.content_form){
	            
	            //检测是否有未填写的信息
	            if(name.value==""){
	                alert("下单会员不能为空,请检查!");
	                isOk=false;
	            }
	            else if(pay_way.value==""){
	                alert("付款方式不能为空,请检查!");
	                isOk=false;
	            }
	            else if(post.value==""){
	                alert("送货方式不能为空,请检查!");
	                isOk=false;
	            }
	            else if(sign.value==""){
	                alert("没有选择订单状态,请检查!");
	                isOk=false;
	            }
	            else if(amount.value==""){
	                alert("订单金额为空,请检查!");
	                isOk=false;
	            }
	            else if(createDate.value==""){
	                alert("订单生成日期为空,请检查!");
	                isOk=false;
	            }
	            else if(reallyName.value==""){
	                alert("收件人姓名为空,请检查!");
	                isOk=false;
	            }
	            else if(address.value==""){
	                alert("收件人地址为空,请检查!");
	                isOk=false;
	            }
	            else if(tel.value==""){
	                alert("联系方式为空,请检查!");
	                isOk=false;
	            }
	            else if(zipCode.value==""){
	                alert("邮编栏信息为空,请检查!");
	                isOk=false;
	            }
	            else if(email.value==""){
	                alert("电子邮箱内容为空,请检查!");
	                isOk=false;
	            }
	            
	            //通过检测,提交表单
	            if(isOk){
	                document.forms[0].submit();
	            }
	            
	            
	        }//end check_infos
	        
	    }
	    
	    
	</script>
	
  </head>
  
  <body>
      <div class="title">
          <h3>订单详细信息</h3>
          <hr/>
      </div>
     <div class="wrapper">
          <form class="content_form" name="content_form" action="<c:url value="indentMgr"/>" method="post">
              <input type="hidden" name="act" value="update"/>
              <div class="wrapper_div">
                  <span>订单编号:</span>
                  <input name="indent_no" readonly="readonly" value="${indent.orderNo}"/>
              </div>
              <div class="wrapper_div">
                  <span>下单会员:</span>
                  <input name="name" value="${indent.name}"/>
              </div>
              <div class="wrapper_div">
                  <span>付款方式:</span>
                  <input name="pay_way" value="${indent.setMony}"/>
              </div>
              <div class="wrapper_div">
                  <span>送货方式:</span>
                  <input name="post" value="${indent.post}"/>
              </div>
              <div class="wrapper_div">
                  <span>订单状态:</span>
                  <select name="sign">
                      <option value="">==请选择==</option>
                      <option value="0" <c:if test="${indent.sign==0}">selected="selected"</c:if>>已提交,未审核</option>
                      <option value="1" <c:if test="${indent.sign==1}">selected="selected"</c:if>>已审核，未配货</option>
                      <option value="2" <c:if test="${indent.sign==2}">selected="selected"</c:if>>已配货，未发货</option>
                      <option value="3" <c:if test="${indent.sign==3}">selected="selected"</c:if>>已发货，未收货</option>
                      <option value="4" <c:if test="${indent.sign==4}">selected="selected"</c:if>>已收货，交易成功</option>
                  </select>
              </div>
              <div class="wrapper_div">
                  <span>订单金额:</span>
                  <input name="amount" value="${indent.orderAmount}"/>
              </div>
              <div class="wrapper_div">
                  <span>生成日期:</span>
                  <input name="createDate" value="${indent.createDate}"/>
              </div>
              <div class="wrapper_div">
                  <div>
                      <span>收件人信息:</span>
                  </div>
                  <div class="wrapper_div">
                      <span>收件人姓名:</span>
                      <input name="reallyName" value="${indent.reallyName}"/>
                  </div>
                  <div class="wrapper_div">
                      <span>地址:</span>
                      <input name="address" value="${indent.address}"/>
                  </div>
                  <div class="wrapper_div">
                      <span>联系方式:</span>
                      <input name="tel" value="${indent.tel}"/>
                  </div>
                  <div class="wrapper_div">
                      <span>邮编:</span>
                      <input name="zipCode" value="${indent.zipCode}"/>
                  </div>
                  <div class="wrapper_div">
                      <span>电子邮箱:</span>
                      <input name="email" value="${indent.email}"/>
                  </div>
              </div>
              <div class="wrapper_div">
                  <span>备注:</span>
                  <input name="bz" value="${indent.bz}"/>
              </div>
              <div class="wrapper_div">
                  <button onclick="goback();">返 回</button> 
                  <button onclick="check_infos();">修 改</button>
                  <button onclick="look_goods_info('${indent.orderNo}');"> 查看商品信息 </button>
              </div>
          </form>
      </div>
  </body>
</html>
